import { api } from './https'

import { AxiosResponse } from 'axios';


// 邮箱登录
export const login = async (queryParam: any): Promise<AxiosResponse<any>> =>
  await api.post({ url: '/user/email/login', isToken: false }, { queryParam });
// 退出登录
export const loginOut = async (): Promise<AxiosResponse<any>> =>
  await api.get({ url: '/user/loginout' });
// 获取邮箱验证码
export const mailCode = async (queryParam: any): Promise<AxiosResponse<any>> =>
  await api.get({ url: '/verification/mail/get' }, { queryParam });
// 获取图形验证码
export const getPic = async (queryParam: any): Promise<AxiosResponse<any>> =>
  await api.get({ url: '/verification/pic/get', responseType: 'blob', isToken: false }, { queryParam });
// 验证图形验证码
export const checkPic = async (queryParam: any): Promise<AxiosResponse<any>> =>
  await api.post({ url: '/verification/pic/check', isToken: false }, { queryParam });
// 登录用户详情
export const userDetail = async (): Promise<AxiosResponse<any>> =>
  await api.post({ url: '/user/detail' });
// 获取文件上传后的列表
export const uploadFileList = async (): Promise<AxiosResponse<any>> =>
  await api.post({ url: '/dfs/upload/list/v2' });